//
//  ZBNavigaationTwoRightButtonsView.swift
//  Maotai
//
//  Created by BO ZHOU on 2020/12/2.
//

import UIKit

open class ZBNavigaationTwoRightButtonsView: ZBNavigationView {

    var pauseButtonClickBlock: (()->Void)?

    lazy var pauseButton: UIButton = {
       
        let pauseButton = UIButton()
        pauseButton.setTitle("暂停", for: .normal)
        pauseButton.setImage(UIImage(named: "video_stop"), for: .normal)
        pauseButton.removeGradientLayer()
        pauseButton.layer.borderWidth = 1
        pauseButton.layer.borderColor = UIColor.gray.cgColor
        pauseButton.cornerRadius = 4
        pauseButton.titleLabel?.font = UIFont.mediumFont(size: 10)

        
        pauseButton.clickBlock = { [unowned self] (btn) in
            self.pauseButtonClickBlock?()
        }
        return pauseButton
    }()
    
    override func setup() {
        super.setup()
        
        self.subContentView.addSubview(pauseButton)
    }
    
    public override func layoutSubviews() {
        super.layoutSubviews()
        
        
        let w: CGFloat = 48
        let h: CGFloat = 23
        pauseButton.frame = CGRect(x: self.rightButton.frame.minX - 3 - w, y: self.rightButton.frame.minY, width: w, height: h)
    }
    

}
